package com.kgc.novel.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("book_income")
@Api(tags = "会员收益类")
public class BookIncome implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 收益主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)

    private String id;
    /**
     * 用户id（用户名）；关联用户表
     */
    @ApiParam("用户ID")
    @TableField("userId")
    private String userId;
    /**
     * 收益金额
     */
    @ApiParam("收益金额")
    @TableField("incomeAmount")
    private Date incomeAmount;
    /**
     * 因为什么收益，收益条件（口令码，邀请码）
     */
    @ApiParam("收益条件")
    @TableField("event")
    private String event;
    /**
     * 收益时间
     */
    @ApiParam("收益时间")
    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


}
